R Map with "Play" Button

Simply press the "play" button to watch CO2 emissions, in metric-tons, change over time. Lighter countries depict more emissions as signified by the scale to the right.

Technical Design

An R map with a "play" button linked to a timeline was made within RStudio with the following library imports: dplyr, plotly, and htmlwidgets. The code was then converted to an HTML file so that the image can be saved locally on a machine. This code was created from our dataset to develop another level of interactivity for users. In addition, hover text was integrated into the map to display country abbreviation to refer to its name and the CO2 value once the animation event is activated by the user. The years are incremented by 5 on the slider.

R Map

✔ Dpylr
✔ Plotly
✔ Htmlwidgets

A map with an "play" button was created in R from our dataset to develop a minimal, easy-to-use level of interactivity for users. It is important to keep in mind with developing the code to make the maps easy to use across all demographics. This map is an example of that consideration. To develop the code, we used the "plot_geo" package in R paired with the following imports: dplyr, plotly, and htmlwidgets. After reading in the dataset, the map was created with plot_geo and the folowing traces were defined to establish the characteristics: color, z, locations, and frame. Lastly, htmlwidgets is used to export the code as an HTML.